<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>friend</title>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
	<meta http-equiv="Cache-Control" content="no-store"/>
	<meta http-equiv="Pragma" content="no-cache"/>
	<meta http-equiv="Expires" content="0"/>
	<link type="text/css" rel="stylesheet" href="../../css/pepper-grinder/jquery-ui-1.8.16.custom.css" />
   	<link type="text/css" rel="stylesheet" href="css/calculator.css" />
   	<script type="text/javascript" src="../../js/jquery.min.js"></script>
   	<script type="text/javascript" src="../../js/jquery-ui-1.8.16.custom.min.js"></script>
	<script type="text/javascript" src="js/calculator.js"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		window.parent.resizeWin("calculator1",0.5,0.4);
		$(window).resize(function() {
			refresh();
		});
		refresh();		
		
	});
	function refresh(){
		var winheight = $(window).height();
		var winwidth = $(window).width();
		$("#bodydiv").css("height",winheight);
		
	}
	</script>
</head>

<body style="background-color=transparent;width:100%;margin-left:0px;margin-top:0px;">
	<div id="bodydiv" style="background:#544d62;">
	<form name="calc">
		<div class="s1">
			<div class="s-content sw2">
				<table cellspacing="0" cellpadding="0" id="calc">
					<tbody>
						<tr style="background-color: #544d62; ">
							<td height="50">
								<table width="100%" cellspacing="0" cellpadding="0" border="0">
									<tbody>
										<tr>
											<td align="center" height="35">
												<input style="text-align:right;color:#ffffff;font-size:24px;line-height:28px" value="0" size="40" readonlyid="inout" name="display">
											</td>
										</tr>
									</tbody>
								</table>
							</td>
						</tr>
						<tr style="background-color: #544d62; ">
							<td>
								<table width="100%">
									<tbody>
										<tr>
											<td id="scale" style="color:#ffffff;">
												<input type="radio" value="16" id="sc1" name="carry" onclick="inputChangCarry(16)">&nbsp;<label for="sc1"> 十六进制</label>&nbsp; 
												<input type="radio" value="10" id="sc2" name="carry" onclick="inputChangCarry(10)" checked>&nbsp;<label for="sc2"> 十进制</label>&nbsp; 
												<input type="radio" value="8" id="sc3" name="carry" onclick="inputChangCarry(8)">&nbsp;<label for="sc3">八进制</label>&nbsp; 
												<input type="radio" value="2" id="sc4" name="carry" onclick="inputChangCarry(2)">&nbsp;<label for="sc4"> 二进制</label>
											</td>
											<td width="220" id="angle" style="color:#ffffff;">
												<input type="radio" value="d" id="ag1" name="angle" onclick="inputChangAngle('d')" checked="">&nbsp;<label for="ag1"> 角度制</label>&nbsp;
												<input type="radio" value="r" id="ag2" name="angle" onclick="inputChangAngle('R')">&nbsp;<label for="ag2">弧度制</label>
											</td>
										</tr>
									</tbody>
								</table>
								<table width="100%">
									<tbody>
										<tr>
											<!-- <td width="190" style="color:#600;">
												<input type="checkbox" name="shift" onclick="inputshift()"><label for="shift">上档功能</label>&nbsp;
												<input type="checkbox" name="hyp" onclick="inputshift()"><label for="hyp"> &nbsp;双曲函数</label>
											</td> -->
											<td align="left" width="250" style="padding-left: 0.5em;">
												<input style="color: #fff;" class="inp1" size="3" readonly name="bracket">
												<input style="color: #fff;" class="inp1" size="3" readonly name="memory">
												<input style="color: #fff;" class="inp1" size="3" readonly name="operator">
											</td>
											<td align="right" style="padding-right: 1em;">
												<input type="button" value=" 退格 " class="inp3" id="bksp" onclick="backspace()">
												<input type="button" value=" 清屏 " class="inp3" id="clear" onclick="document.calc.display.value = 0 ">
												<input type="button" value=" 全清 " class="inp3" id="clear_all" onclick="clearall()">
											</td>
										</tr>
									</tbody>
								</table>
								<table width="100%" class="jsbt">
									<tbody>
										<tr>
											<td><table>
													<tbody>
														<tr align="center">
															<td><input type="button" value="PI" class="inp5" onclick="inputfunction('pi','pi')"
																name="pi">
															</td>
															<td><input type="button" value="E" class="inp5" onclick="inputfunction('e','e')"
																name="e">
															</td>
															<td><input type="button" value="d.ms" class="inp2" onclick="inputfunction('dms','deg')"
																name="bt">
															</td>
														</tr>
														<tr align="center">
															<td><input type="button" value="(" class="inp2" onclick="addbracket()"
																name="start_brk">
															</td>
															<td><input type="button" value=")" class="inp2" onclick="disbracket()"
																name="end_brk">
															</td>
															<td><input type="button" value="ln" class="inp2" onclick="inputfunction('ln','exp')"
																name="ln">
															</td>
														</tr>
														<tr align="center">
															<td><input type="button" value="sin" class="inp2" onclick="inputtrig('sin','arcsin','hypsin','ahypsin')"
																name="sin">
															</td>
															<td><input type="button" value="x^y" class="inp2" onclick="operation('^',7)"
																name="pow">
															</td>
															<td><input type="button" value="log" class="inp2" onclick="inputfunction('log','expdec')"
																name="log">
															</td>
														</tr>
														<tr align="center">
															<td><input type="button" value="cos" class="inp2" onclick="inputtrig('cos','arccos','hypcos','ahypcos')"
																name="cos">
															</td>
															<td><input type="button" value="x^3" class="inp2" onclick="inputfunction('cube','cubt')"
																name="cube">
															</td>
															<td><input type="button" value="n!" class="inp2" onclick="inputfunction('!','!')"
																name="fact">
															</td>
														</tr>
														<tr align="center">
															<td><input type="button" value="tan" class="inp2" onclick="inputtrig('tan','arctan','hyptan','ahyptan')"
																name="tan">
															</td>
															<td><input type="button" value="x^2" class="inp2" onclick="inputfunction('sqr','sqrt')"
																name="sqr">
															</td>
															<td><input type="button" value="1/x" class="inp2" onclick="inputfunction('recip','recip')"
																name="recip">
															</td>
														</tr>
													</tbody>
												</table></td>
											<td width="30"></td>
											<td>
												<table>
													<tbody>
														<tr>
															<td align="center"><input type="button" value="储存" onclick="putmemory()"
																class="inp3" id="stor">
															</td>
														</tr>
														<tr>
															<td><input type="button" value="取存" class="inp3" onclick="getmemory()"
																id="get_mem">
															</td>
														</tr>
														<tr>
															<td><input type="button" value="累存" class="inp3" onclick="addmemory()"
																id="add_mem">
															</td>
														</tr>
														<tr>
															<td><input type="button" value="积存" class="inp3" onclick="multimemory()"
																id="multi_mem">
															</td>
														</tr>
														<tr>
															<td height="33"><input type="button" value="清存" onclick="clearmemory()"
																class="inp3" id="clear_mem">
															</td>
														</tr>
													</tbody>
												</table></td>
											<td width="30"></td>
											<td><table>
													<tbody>
														<tr align="center">
															<td><input type="button" value="7" class="inp4" onclick="inputkey('7')"
																name="k7">
															</td>
															<td><input type="button" value="8" class="inp4" onclick="inputkey('8')"
																name="k8">
															</td>
															<td><input type="button" value="9" class="inp4" onclick="inputkey('9')"
																name="k9">
															</td>
															<td><input type="button" value="/" class="inp6" onclick="operation('/',6)"
																name="div">
															</td>
															<td><input type="button" value="取余" class="inp6" onclick="operation('%',6)"
																name="res">
															</td>
															<td><input type="button" value="与" class="inp6" onclick="operation('&',3)"
																name="and">
															</td>
														</tr>
														<tr align="center">
															<td><input type="button" value="4" class="inp4" onclick="inputkey('4')"
																name="k4">
															</td>
															<td><input type="button" value="5" class="inp4" onclick="inputkey('5')"
																name="k5">
															</td>
															<td><input type="button" value="6" class="inp4" onclick="inputkey('6')"
																name="k6">
															</td>
															<td><input type="button" value="*" class="inp6" onclick="operation('*',6)"
																name="mul">
															</td>
															<td><input type="button" value="取整" class="inp6" onclick="inputfunction('floor','deci')"
																name="floor">
															</td>
															<td><input type="button" value="或" class="inp6" onclick="operation('|',1)"
																name="or">
															</td>
														</tr>
														<tr align="center">
															<td><input type="button" value="1" class="inp4" onclick="inputkey('1')"
																name="k1">
															</td>
															<td><input type="button" value="2" class="inp4" onclick="inputkey('2')"
																name="k2">
															</td>
															<td><input type="button" value="3" class="inp4" onclick="inputkey('3')"
																name="k3">
															</td>
															<td><input type="button" value="-" class="inp6" onclick="operation('-',5)"
																name="minus">
															</td>
															<td><input type="button" value="左移" class="inp6" onclick="operation('<',4)"
																name="l_shift">
															</td>
															<td><input type="button" value="非" class="inp6" onclick="inputfunction('~','~')"
																name="not">
															</td>
														</tr>
														<tr align="center">
															<td><input type="button" value="0" class="inp4" onclick="inputkey('0')"
																name="k0">
															</td>
															<td><input type="button" value="+/-" class="inp4" onclick="changeSign()"
																name="sign">
															</td>
															<td><input type="button" value="." class="inp4" onclick="inputkey('.')"
																name="kp">
															</td>
															<td><input type="button" value="+" class="inp6" onclick="operation('+',5)"
																name="add">
															</td>
															<td><input type="button" value="＝" class="inp6" onclick="results()"
																name="result">
															</td>
															<td><input type="button" value="异或" class="inp6" onclick="operation('x',2)"
																name="xor">
															</td>
														</tr>
														<tr align="center">
															<td><input type="button" value="A" class="inp5" onclick="inputkey('a')"
																name="ka" disabled>
															</td>
															<td><input type="button" value="B" class="inp5" onclick="inputkey('b')"
																name="kb" disabled>
															</td>
															<td><input type="button" value="C" class="inp5" onclick="inputkey('c')"
																name="kc" disabled>
															</td>
															<td><input type="button" value="D" class="inp5" onclick="inputkey('d')"
																name="kd" disabled>
															</td>
															<td align="center"><input type="button" value="E" onclick="inputkey('e')"
																class="inp5" name="ke" disabled>
															</td>
															<td align="center"><input type="button" value="F" onclick="inputkey('f')"
																class="inp5" name="kf" disabled>
															</td>
														</tr>
													</tbody>
												</table>
											</td>
										</tr>
									</tbody>
								</table>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
	</form>
	</div>
</body>
</html>

